// 定义状态
const initState = {
    isLogin: false
}

// 定义action
export function updateLogin(payload) {
    return {
        type: 'LOGIN_UPDATE_LOGIN',
        payload
    }
}

// reducer
export default (state=initState,action) => {
    switch(action.type) {
        case 'LOGIN_UPDATE_LOGIN':
            return {
                ...state,
                isLogin: action.payload
            }
        default:
            return state;
    }
}


